<?php

namespace App\Http\Controllers\Backend;

use App\Models\Hr;
use App\Http\Requests\Backend\Hr\HrRequest;
use Illuminate\Http\Request;

class HrController extends BaseController {

    public function index(Request $request)
    {
        $value = $request->get('query');
        if ($value) {
            $hrs = Hr::ofAll()->OfSearch($value)->paginate($this->pagesize);
        } else {
            $hrs = Hr::ofAll()->paginate($this->pagesize);
        }

        return view('backend.hr.index')->with('hrs', $hrs);
    }

//    public function search(Request $request)
//    {
//        $value = $request->get('value');
//        $hrs = Hr::ofAll()->OfSearch()->paginate($this->pagesize);
//        return view('')
//    }
}